const _instanceof = (instance: object, TargetClass: Function): boolean => {
  if (instance === null || typeof instance !== "object") return false;
  let proto: string = Object.getPrototypeOf(instance);
  while (proto) {
    if (proto === TargetClass.prototype) return true;
    proto = Object.getPrototypeOf(proto);
  }
  return false;
};
console.log(_instanceof([12, 213, 213], Object));
